class HandoverEval 
{
	public static void main(String args[])	
	{
		MacrocellBs BS = new MacrocellBs();
		FemtocellBs FAP[] = new FemtocellBs[20];
		UE ue[] = new UE[20];

		//初始化基站相关参数
		BS.MaxUsersNum = 40;
		BS.currentUsers = 0;
		BS.posX = 100;
		BS.posY = 100;
		BS.radius = 1500;
		BS.id = 0;
		
		//初始化FAP相关参数
		for(int i = 0; i < 20; i++)
		{
			FAP[i] = new FemtocellBs();
			FAP[i].MaxUsersNum = 5;
			FAP[i].currentUsers = 0;
			
			FAP[i].posX = 50 + i;
			FAP[i].posY = 50 + i;
			FAP[i].radius = 20;
			FAP[i].id = i;
		}
	
		for(int i = 0; i < 20; i++)
		{
			ue[i] = new UE();
			
			ue[i].setPosition(20, 20);
			ue[i].id = i;
			
			/*
			for(int j = 0; j < 20; j++)
			{
				ue[i].getFemtocellBsRSS(FAP[i]);
			}
			ue[i].getMacroBsRSS(BS);
			*/
		}
		
		
		HandoverManagement handoverManagement = new HandoverManagement();
		int[] handoverDistinationBsId = new int[ue.length];
		
		for(int i = 0; i < ue.length; i++)
		{
			for(int j = 0; j < FAP.length; j++)
				{
					handoverManagement.estimateChannel(FAP[i], ue[i]);
				}
			ue[i].getMacroBsRSS(BS);
		}
		for(int i = 0; i < ue.length; i++)
		{	
			handoverDistinationBsId[i] = handoverManagement.getBsIDOfHighestRSS(ue[i]);			
		}
		
		
		System.out.println("BsRSS:" + ue[0].MacroBsRSS);
		for(int i = 0; i < ue.length; i++)
		{
			System.out.println("distination:" + handoverDistinationBsId[i]);
		}
	
	}
}
